import API from "@/api/index";

/* 个人中心  */

// 邮箱管理
// http://39.107.14.104:8081/swagger-ui.html#/299922514323450210463703831665
// 添加邮箱
export const addEmail = (data) => {
  const url = '/feature/usertimingremind/add';
  return API.post(url, data);
}
// 删除邮箱
export const deleteEmail = (data) => {
  const url = '/feature/usertimingremind/delete';
  return API.post(url, data);
}
// 查询邮箱
export const checkEmail = (id) => {
  const url = `/feature/usertimingremind/info/${id}`;
  return API.get(url);
}
// 邮箱列表
export const getEmailList = () => {
  const url = `/feature/usertimingremind/list`;
  return API.get(url);
}
// 修改
export const updateEmail = (data) => {
  const url = `/feature/usertimingremind/update`;
  return API.post(url, data);
}

// 供应管理、需求管理
// http://39.107.14.104:8081/swagger-ui.html#/2999225143203792771420449246872550921475
// 添加供应、需求
export const addSupplyDemand = (data) => {
  const url = `/user/usersupplydemand/add`;
  return API.post(url, data);
}
// 供应、需求列表
export const supplyDemandList = (data) => {
  const url = `/user/usersupplydemand/list`;
  return API.get(url, data);
}

// 更新供应、需求
export const updateSupplyDemand = (data) => {
  const url = `/user/usersupplydemand/update`;
  return API.post(url, data);
}
// 发票信息
// http://39.107.14.104:8081/swagger-ui.html#/2999225143243203108020449246872550921475
// 申请发票
export const apyInvoice = (data) => {
  const url = `/user/userinvoice/add`;
  return API.post(url, data);
}
// 删除发票信息
export const deleteInvoice = (data) => {
  const url = `/user/userinvoice/delete`;
  return API.post(url, data);
}
// 获取开票列表
export const getInvoiceList = (data) => {
  const url = `/user/userinvoice/getWaitInvoiceMoney`;
  return API.get(url, data);
}
// 历史发票列表
export const getHistoryInvoiceList = (data) => {
  const url = `/user/userinvoice/list`;
  return API.get(url, data);
}
// 修改发票信息
export const updateInvoice = (data) => {
  const url = `/user/userinvoice/update`;
  return API.post(url, data);
}
// 修改密码
// http://39.107.14.104:8081/swagger-ui.html#!/29992251432550921475/changPwdUsingPOST
export const changePassWord = (data) => {
  const url = `/user/user/changPwd`;
  return API.post(url, data);
}